<template>
<router-link :to="`/songitem/${item.id}`" tag="li">
      <img :src="item.picUrl" />
      <p>{{item.playCount|formatNum}}</p>
      <h6>{{item.name}}</h6>
</router-link>
</template>
<script>
export default {
  props:{
    item:Object
  },
  // 过滤器 显示的听歌数量格式化
  filters:{
    formatNum(value){
      return (value / 10000).toFixed(1)+'万'
    }
  }
}
</script>
<style lang="less" scoped>
li{
  width: 32%;
  position: relative;
  overflow: hidden;
  img{
    width: 100%;
    border-radius: 20px;
  }
  p{
    position: absolute;
    right: 12px;
    top: 6px;
    z-index: 3;
    padding-left: 13px;
    color: #fff;
    font-size: 12px;
    background-position: 0;
    background-image: url();
    background-repeat: no-repeat;
    background-size: 11px 10px;
    text-shadow: 1px 0 0 rgb(0,0,0/15%);
  }
  h6{
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 6px 2px 0px 3px;
    min-height: 30px;
    line-height: 1.2;
    font-size: 12px;
    font-weight: 400;
    width: 100%;

  
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

  }
}
</style>